import request from '@/utils/request'

// ----------------------------------------------------设备报修管理 接口文档----------------------------------------------------------------------------

// 获取设备报修管理列表---------------------------------------- 
export function list (params) {
  return request({
    url: '/function/equipment/repair/list',
    method: 'get',
    params
  })
}

// 获取设备报修列表详情---------------------------------------- 
export function listDetail (id) {
  return request({
    url: '/function/equipment/repair/' + id,
    method: 'get',
  })
}

//新增： 获取设备列表----------------------------------------
export function listEquipmentAccount (params) {
  return request({
    url: '/function/equipment/account/partInfo/list',
    method: 'get',
    params
  })
}

//新增： 获取评级字典列表----------------------------------------
export function listDictionary (params) {
  return request({
    url: '/system/dict/data/list',
    method: 'get',
    params
  })
}

//新增： 提交接口----------------------------------------
export function add (data) {
  return request({
    url: '/function/equipment/repair',
    method: 'post',
    data
  })
}

// 已消除：列表的已消除接口---------------------------------------
export function update (data) {
  return request({
    url: '/function/equipment/repair/remove',
    method: 'put',
    data
  })
}

// 转维修单：列表的转维修单接口---------------------------------------
export function updateCreate (data) {
  return request({
    url: '/function/equipment/repair/turn/order',
    method: 'put',
    data
  })
}